package org.flex.finereport
{
	public class CJKEncode
	{
		public static function encode(str:String):String{
			if (typeof str != 'string') {
				return str;
			}
			var strEncode:String = "";
			for (var i:int = 0; i < str.length; i++) {
				var code:int = str.charCodeAt(i);
				if (code >= 128 || code == 91 || code == 93){
					strEncode += "[" + code.toString(16) + "]";
				}
				else{
					strEncode += str.charAt(i);
				}
			}
			return strEncode
		}
	}
}